home *** CD-ROM | disk | FTP | other *** search
- #ifndef __MEMORY_H
- #define __MEMORY_H
- /*
- ** $VER: memory.h 1.0 (20 Dec 1995)
- **
- ** (C) Copyright 1995 Marius Gröger
- ** All Rights Reserved
- **
- ** $HISTORY:
- **
- ** 20 Dec 1995 : 001.000 : created
- */
-
- /* system header files */
- #ifndef EXEC_SEMAPHORES_H
- #include <exec/semaphores.h>
- #endif
- #ifndef EXEC_LISTS_H
- #include <exec/lists.h>
- #endif
- #ifndef EXEC_INTERRUPTS_H
- #include <exec/interrupts.h>
- #endif
- #ifndef EXEC_LIBRARIES_H
- #include <exec/libraries.h>
- #endif
- #ifndef DOS_DOS_H
- #include <dos/dos.h>
- #endif
-
- #ifndef __COMPILER_H
- #include "compiler.h"
- #endif
-
-
- /****************************************************************************/
-
- /* default values */
-
- /* maximum values */
-
- /****************************************************************************/
-
- struct MemoryBase
- {
- struct Library mb_DevNode; /* basic device structure */
- ULONG mb_SegList; /* pointer to code */
- struct Library * mb_SysBase;
- struct SignalSemaphore mb_Lock;
- };
-
- #ifdef __SASC
- /*
- ** redirect all shared library bases to our device base.
- */
- # define SysBase mb->mb_SysBase
- /*
- ** This macro declares a local variable which temporary gets
- ** SysBase directly from AbsExecBase.
- */
- # define LOCALSYSBASE struct { void *mb_SysBase; } *mb = (void*)0x4
- /*
- ** Use this macro as argument for all functions which need to
- ** have access to your data base.
- */
- # define BASEPTR struct MemoryBase *mb
- #else
- # error Please define library bases for your compiler
- #endif
-
- #endif
-